<template>
    <div>
        <span>A组件->{{msg}}</span>
        <input type="button" value="把a组件数据传给b" @click ="sendToBus">
    </div>
</template>

<script>
    import bus from './bus'
    export default {
        name: "wasd",
        data(){
            return{
                msg:"87w4dqw484qwd"
            }
        },
        methods:{
            sendToBus(){
                bus.$emit("aevent",this.msg);

            }
        }
    }
</script>

<style scoped>

</style>